<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
<title>凯盛项目管理系统</title>
<link rel="stylesheet" type="text/css" href="style/bootstrap.min.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<style type="text/css">
body {
	padding-top: 70px;
	background-image:url(img/ab.png);
}

#gotoTop{
				display:none;
				position:fixed;
				top:75%;
				left:30%;
				cursor:pointer;
				margin-top:-50px;
				margin-left:520px;
				padding:9px 4px;
				width:20px;
				text-align:center;
				border:1px solid #e0e0e0;
				background:#fff;
			}
			/*用CSS表达式(expression)来实现ie6下position:fixed效果*/
			#gotoTop{
				_position:absolute;
				_top:expression(documentElement.scrollTop + documentElement.clientHeight * 3/4 + "px")}
			/*鼠标进入的反馈效果*/
			#gotoTop.hover{
				background:#5CB542;
				color:#fff;
				text-decoration:none;
			}
</style>
</head>
<body class="body">

	<%@ include file="top.jsp"%>
	<%@ include file="leftlabel.jsp"%>
	<div class="span6" id="ccc">

		<ul class="breadcrumb"
			style="margin-bottom:0px;border-radius: 3px 3px 0 0;">
			<li class="active"><i class="icon-th"></i>你在想什么？</li>
		</ul>
		<div class="wall">
			<form style="margin:0px" method="post" action="addmessage.action">
				<textarea name="message.content" id="" style="width:460px" rows="3" placeholder="#你想说点什么#"></textarea>
				<button class="btn btn-primary">发布</button>
			</form>
		</div>
	<div>
	
	
	    <div class="tabbable">
		    <ul class="nav nav-tabs">
			    <li class="active"><a href="#1" data-toggle="tab">Section 1</a></li>
			    <li><a href="#2" data-toggle="tab">Section 2</a></li>
		    </ul>
		    <div class="tab-content">
			    <div class="tab-pane active" id="1">
			    <p>I'm in Section 1.</p>
			    </div>
			    
			    <div class="tab-pane" id="2">
			    <p>Howdy, I'm in Section 2.</p>
			    </div>
		    </div>
	    </div>
	
	
	
	
	
	
	
	
	
	 <ul class="breadcrumb"
				style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:20px">
				<li class="active"><i class="icon-th"></i>@关于我的</li>
				<div id="info" class="wall">
					<c:forEach items="${atmessageList}" var="atmessage">
						<blockquote>
							${atmessage.message.user.username}<small>
							${atmessage.message.content}<small>
								发布于${atmessage.message.createtime} <br />
						</blockquote>
					</c:forEach>
				</div>
	</ul>
	</div>
	    
	<div>	
	 <ul class="breadcrumb"
				style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:20px">
				<li class="active"><i class="icon-th"></i>信息流</li>
				<div id="info" class="wall">
					<c:forEach items="${messageList}" var="message">
						<blockquote>
							${message.user.username}:${message.content} <small>
								发布于${message.createtime} <br />
						</blockquote>
					</c:forEach>
				</div>
	</ul>
	</div>
	

		<div class="pagination pull-right">
			<ul>
			</ul>
		</div>


	</div>
	<div class="span3">
		<div class="box">
			<div class="head">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的任务</div>
			<c:if test="${fn:length(taskList) == 0}" >
  				<div style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					还没有给你分配任务					
  				</div>
  			</c:if>
			<c:forEach items="${taskList}" var="task">
				<ul>
					<li><a href="edittask.action?id=${task.id}">${task.taskname}</a>
					</li>
				</ul>
			</c:forEach>
		</div>
	</div>
	</div>
	</div>
</body>
<script type="text/javascript">

function gotoTop(min_height){
	//预定义返回顶部的html代码，它的css样式默认为不显示
	var gotoTop_html = '<div id="gotoTop">返回顶部</div>';
	//将返回顶部的html代码插入页面上id为page的元素的末尾 
	$("#ccc").append(gotoTop_html);
	$("#gotoTop").click(//定义返回顶部点击向上滚动的动画
		function(){$('html,body').animate({scrollTop:0},700);
	}).hover(//为返回顶部增加鼠标进入的反馈效果，用添加删除css类实现
		function(){$(this).addClass("hover");},
		function(){$(this).removeClass("hover");
	});
	//获取页面的最小高度，无传入值则默认为600像素
	min_height ? min_height = min_height : min_height = 500;
	//为窗口的scroll事件绑定处理函数
	$(window).scroll(function(){
		//获取窗口的滚动条的垂直位置
		var s = $(window).scrollTop();
		//当窗口的滚动条的垂直位置大于页面的最小高度时，让返回顶部元素渐现，否则渐隐
		if( s > min_height){
			$("#gotoTop").fadeIn(500);
		}else{
			$("#gotoTop").fadeOut(200);
		};
	});
};
	gotoTop();



	$(function() {
		var p = 1;
		var flag = true;
		$(window).scroll(
				function() {
					var x = ($(document).height() - $(window).height())
							- $(window).scrollTop();
					if (x <= 10) {
						if(flag){
						$.post("ajaxmessage.action", {
							"p" : p
						}, function(data) {
							$(data.ajaxList).each(function(){
								$("<blockquote>"+this.username+":"+
										this.content+" <small>发布于 "+
										this.createtime+
										"<br />	</blockquote>").appendTo($("#info"));
								
								
							});
							p++;
							if(p>data.totalpage){
								flag = false;
							}
						});
					}
					}
				});
	});
</script>
</html>